package com.easybuilder.core.im.service.impl;

import com.easybuilder.common.enums.DingRobotEnum;
import com.easybuilder.common.utils.DingUtil;
import com.easybuilder.core.im.service.DingMessageService;
import org.springframework.stereotype.Service;

@Service
public class DingMessageServiceImpl implements DingMessageService {
    /** 发送钉钉机器人群消息 */
    @Override
    public void sendRobotMsg(String robotName, String message) {
        String url = DingRobotEnum.valueOf(robotName).getValue();
        DingUtil.sendRobotMsg(url, message);
    }

    public static void main(String[] args) {
        String name = "ZXKF";
        String value = DingRobotEnum.valueOf(name).getValue();
        System.out.println(value);
    }
}
